<?php
/**
 * Created by PhpStorm.
 * User: *!N.J
 * Date: 2021/8/22
 * Time: 22:15
 * QQ:1467572213
 */

namespace app\agent\controller;

use think\Controller;
use think\facade\Request;
use think\facade\Session;
use \app\index\model\Base as Base_m;

class Base extends Controller
{
    public function initialize()
    {
        $is_login = Session::has('agent_id');
        if ($is_login == false) {
            $this->redirect('login/index');
        }else{
            $controller = Request::controller(true);
            $this->assign('controller',$controller);
            $user_id = Session::get('agent_id');
            $user_info = Base_m::get_user_info($user_id);
            $this->assign('user_info',$user_info);
        }
    }

}